package day02;

import java.util.Scanner;

public class homework05 {
    public static void main(String[] args) {
        System.out.println("请输入大于2的数");
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        while (true) {
            if (num > 2) {
                break;
            }
            if (num <= 2) {
                System.out.println("请输入大于2的数");
            }
            num = sc.nextInt();
        }
        jisuan(num);
    }

    public static void jisuan(int num) {
        for (int i = 1; ; i++) {
            if(i*i==num){
                System.out.println(num+"的平方根是"+i);
                break;
            }
            if(i*i < num && (i+1)*(i+1) > num){
                System.out.println(num+"的平方根在"+i+"与"+(i+1)+"之间");
                break;
            }
        }
    }
}
